﻿using System;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x020002AC RID: 684
	public class TCreateTableOption : TParseTreeNode
	{
		// Token: 0x170004A1 RID: 1185
		// (get) Token: 0x060016D6 RID: 5846 RVA: 0x0032776C File Offset: 0x0032596C
		public TSourceToken DateRetentionInDays
		{
			get
			{
				return this._dateRetentionInDays;
			}
		}

		// Token: 0x170004A2 RID: 1186
		// (get) Token: 0x060016D7 RID: 5847 RVA: 0x00327774 File Offset: 0x00325974
		public TSourceToken CommentToken
		{
			get
			{
				return this._commentToken;
			}
		}

		// Token: 0x170004A3 RID: 1187
		// (get) Token: 0x060016D8 RID: 5848 RVA: 0x0032777C File Offset: 0x0032597C
		public TDummy StageFileFormat
		{
			get
			{
				return this._stageFileFormat;
			}
		}

		// Token: 0x170004A4 RID: 1188
		// (get) Token: 0x060016D9 RID: 5849 RVA: 0x00327784 File Offset: 0x00325984
		public TDummy CopyOptions
		{
			get
			{
				return this._copyOptions;
			}
		}

		// Token: 0x170004A5 RID: 1189
		// (get) Token: 0x060016DA RID: 5850 RVA: 0x0032778C File Offset: 0x0032598C
		// (set) Token: 0x060016DB RID: 5851 RVA: 0x00327794 File Offset: 0x00325994
		public ECreateTableOption CreateTableOptionType
		{
			get
			{
				return this._createTableOptionType;
			}
			set
			{
				this._createTableOptionType = value;
			}
		}

		// Token: 0x060016DC RID: 5852 RVA: 0x0032779D File Offset: 0x0032599D
		public override void init(object arg1)
		{
			this._createTableOptionType = (ECreateTableOption)arg1;
		}

		// Token: 0x170004A6 RID: 1190
		// (get) Token: 0x060016DD RID: 5853 RVA: 0x003277AB File Offset: 0x003259AB
		public TExpressionList ExpressionList
		{
			get
			{
				return this._expressionList;
			}
		}

		// Token: 0x060016DE RID: 5854 RVA: 0x003277B4 File Offset: 0x003259B4
		public override void init(object arg1, object arg2)
		{
			this.init(arg1);
			switch (this._createTableOptionType)
			{
			case ECreateTableOption.etoClusterBy:
				this._expressionList = (TExpressionList)arg2;
				return;
			case ECreateTableOption.etoStageFileFormat:
				this._stageFileFormat = (TDummy)arg2;
				return;
			case ECreateTableOption.etoStageCopyOptions:
				this._copyOptions = (TDummy)arg2;
				return;
			case ECreateTableOption.etoDateRetentionTimeInDays:
				this._dateRetentionInDays = (TSourceToken)arg2;
				break;
			case ECreateTableOption.etoChangeTracking:
			case ECreateTableOption.etoDefaultDDLCollation:
			case ECreateTableOption.etoCopyGrants:
				break;
			case ECreateTableOption.etoComment:
				this._commentToken = (TSourceToken)arg2;
				return;
			default:
				return;
			}
		}

		// Token: 0x060016DF RID: 5855 RVA: 0x00327836 File Offset: 0x00325A36
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this._commentToken != null && psql is TCreateTableSqlStatement)
			{
				((TCreateTableSqlStatement)psql).TableComment = new TObjectName(this._commentToken, EDbObjectType.comment);
			}
		}

		// Token: 0x040017CA RID: 6090
		private TSourceToken _dateRetentionInDays;

		// Token: 0x040017CB RID: 6091
		private TSourceToken _commentToken;

		// Token: 0x040017CC RID: 6092
		private TDummy _stageFileFormat;

		// Token: 0x040017CD RID: 6093
		private TDummy _copyOptions;

		// Token: 0x040017CE RID: 6094
		private ECreateTableOption _createTableOptionType;

		// Token: 0x040017CF RID: 6095
		private TExpressionList _expressionList;
	}
}
